<script type="text/ng-template" id="viewPatient.html">
    <div ng-include="'views/work/process_patcase_details.html'" onload="viewOnly=true"></div>
</script>

<script type="text/ng-template" id="viewSearch.html">
    <div ng-include="'views/work/process_search_details.html'" onload="viewOnly=true"></div>
</script>

<script type="text/ng-template" id="viewPatCase.html">
    <div ng-include="'views/work/process_patcase_list.html'" onload="viewOnly=true"></div>
</script>

<script type="text/ng-template" id="addPatient.html">
    <div ng-include="'views/work/process_patcase_details.html'" onload="viewOnly=false"></div>
</script>

<script type="text/ng-template" id="editPatient.html">
    <div ng-include="'views/work/process_patcase_details.html'" onload="viewOnly=false"></div>
</script>

<script type="text/ng-template" id="servreqFlow.html">
    <div ng-include="'views/work/basic_servreq_flow.html'" onload="viewOnly=true"></div>
</script>

<script type="text/ng-template" id="diagProcess.html">
    <div ng-include="'views/work/process_diagnosis_process.html'"></div>
</script>

<script type="text/ng-template" id="imagediag.html">
    <div ng-include="'views/work/process_service_imagediag.html'"></div>
</script>

<script type="text/ng-template" id="wechatpay.html">
    <div ng-include="'views/work/process_pay_wechat.html'"></div>
</script>

<script type="text/ng-template" id="setInitial.html">
    <div class="modal-body">
        <h4 translate="business.patcase.send_to_assistant_confirm"></h4>
    </div>
    <div class="modal-footer">
        <button class="btn btn-default" ng-click="cancel()" translate="common.no"></button>
        <button class="btn btn-success" data-loading-text="{{ 'common.loading' | translate }}"
                ng-click="ok()" translate="common.yes"></button>
    </div>
</script>

<script type="text/ng-template" id="setNeedDiag.html">
    <div class="modal-header">
        <h3>
            <span translate="business.patcase.send_for_diagnosis_confirm"></span>
            <button type="button" class="close" ng-click="cancel()"><span class="icon icon-close"
                                                                          aria-hidden="true"></span></button>
        </h3>
        <span translate="business.patcase.send_for_diagnosis_markeddoctor"></span>
    </div>
    <div class="modal-body">
        <table class="table table-bordered">
            <thead>
            <tr>
                <th style="text-align: center"><span translate="common.name"></span></th>
                <th style="text-align: center" ng-if="!isSmart"><span translate="user.gender"></span></th>
                <th style="text-align: center"><span translate="servicecreate.hospital"></span></th>
                <th style="text-align: center"><span translate="servicecreate.departments"></span></th>
                <th style="text-align: center" ng-if="!isSmart" translate="user.mobilephone"></th>
                <th style="text-align: center"><span translate="common.operate"></span></th>
            </tr>
            </thead>
            <tbody>
            <tr ng-if="selected.item._chosen_Expert.userId > 0">
                <td class="font-bold" style="color: red">{{selected.item._chosen_Expert.realName}}</td>
                <td  ng-if="!isSmart" class="font-bold" style="color: red">{{'user.gender.' + selected.item._chosen_Expert.gender | translate}}</td>
                <td class="font-bold" style="color: red">{{selected.item._chosen_Expert._doctor._hosp.hosp_Cn_Name}}</td>
                <td class="font-bold" style="color: red">{{selected.item._chosen_Expert._doctor._dept.dept_Cn_Name}}</td>
                <td  ng-if="!isSmart" class="font-bold" style="color: red">{{selected.item._chosen_Expert.mobile_Phone}}</td>
                <td style="text-align: center">
                    <button type="button" class="btn btn-sm btn-danger"
                            ng-click="onSetSelection($event, 'NeedDiag', selected.item.servReq_Id, selected.item._chosen_Expert.userId)"
                            translate="common.select"></button>
                </td>
            </tr>
            <tr ng-repeat="item in specialists" ng-if="item.userId != selected.item._chosen_Expert.userId">
                <td>{{item.realName}}</td>
                <td  ng-if="!isSmart">{{'user.gender.' + item.gender | translate}}</td>
                <td>{{item._doctor._hosp.hosp_Cn_Name}}</td>
                <td>{{item._doctor._dept.dept_Cn_Name}}</td>
                <td  ng-if="!isSmart">{{item.mobile_Phone}}</td>
                <td style="text-align: center">
                    <button type="button" class="btn btn-sm btn-danger"
                            ng-click="onSetSelection($event, 'NeedDiag', selected.item.servReq_Id, item.userId)"
                            translate="common.select">
                    </button>
                </td>
            </tr>
            </tbody>
        </table>
    </div>

    <div class="modal-footer">
        <button class="btn btn-default" ng-click="cancel()" translate="common.close"></button>
    </div>
</script>

<script type="text/ng-template" id="shareCase.html">
    <div class="modal-header">
        <h3>
            <span translate="business.patcase.share_for_diagnosis_confirm"></span>
            <button type="button" class="close" ng-click="cancel()"><span class="icon icon-close"
                                                                          aria-hidden="true"></span></button>
        </h3>
    </div>
    <div class="modal-body">
        <table class="table table-bordered">
            <thead>
            <tr>
                <th><span translate="common.name"></span></th>
                <th ng-if="!isSmart"><span translate="user.gender"></span></th>
                <th><span translate="servicecreate.hospital"></span></th>
                <th ng-if="!isSmart"><span translate="servicecreate.departments"></span></th>
                <th ng-if="!isSmart" translate="user.mobilephone"></th>
                <th><span translate="common.operate"></span></th>
            </tr>
            </thead>
            <tbody>
            <tr ng-repeat="friend in notes.list" ng-if="friend.userId>0">
                <td>{{friend.user.realName}}</td>
                <td ng-if="!isSmart">{{'user.gender.' + friend.user._gender.value | translate}}</td>
                <td>{{friend.user._doctor._hosp.hosp_Cn_Name}}</td>
                <td ng-if="!isSmart">{{friend.user._doctor._dept.dept_Cn_Name}}</td>
                <td ng-if="!isSmart" >{{friend.user.mobile_Phone}}</td>
                <td>
                    <button type="button" class="btn btn-sm btn-danger"
                            ng-click="sharePatient(selected.item, friend.userId)"
                            translate="common.select">
                    </button>
                </td>
            </tr>
            </tbody>
        </table>
    </div>

    <div class="modal-footer">
        <button class="btn btn-default" ng-click="cancel()" translate="common.close"></button>
    </div>
</script>

<script type="text/ng-template" id="SetRetNON.html">
    <div class="modal-body" ng-init="selected.input = {}">
        <h4 translate="business.patcase.send_for_no_operation_confirm"></h4>
        <div class="col-sm-12">
            <textarea class="form-control" ng-model="selected.input.desc" rows="2"
                      placeholder="{{ 'business.patcase.description' | translate }}"></textarea>
        </div>
        <div class="clearfix"></div>
    </div>
    <div class="modal-footer">
        <button class="btn btn-default" ng-click="cancel()" translate="common.no"></button>
        <button class="btn btn-success" data-loading-text="{{ 'common.loading' | translate }}"
                ng-click="onSetSelection($event, 'RetNON', selected.item.servReq_Id, selected.input)"
                translate="common.yes"></button>
    </div>
</script>

<script type="text/ng-template" id="SetRetByMedAdmin.html">
    <div class="modal-body">
        <h4 translate="business.patcase.return_by_medical_admin"></h4>
        <div class="col-sm-12">
            <textarea class="form-control" ng-model="selected.input.desc" rows="2"
                      placeholder="{{ 'business.patcase.description' | translate }}"></textarea>
        </div>
        <div class="clearfix"></div>
    </div>
    <div class="modal-footer">
        <button class="btn btn-default" ng-click="cancel()" translate="common.no"></button>
        <button class="btn btn-success" data-loading-text="{{ 'common.loading' | translate }}"
                ng-click="onSetSelection($event, 'RetByMedAdmin', selected.item.servReq_Id, selected.input)"
                translate="common.yes"></button>
    </div>
</script>

<script type="text/ng-template" id="RetBySpecia.html">
    <div class="modal-body">
        <h4 translate="business.patcase.return_by_specia"></h4>
        <div class="col-sm-12">
            <textarea class="form-control" ng-model="selected.input.diag_Desc" rows="2"
                      placeholder="{{ 'business.patcase.description' | translate }}"></textarea>
        </div>
        <div class="clearfix"></div>
    </div>
    <div class="modal-footer">
        <button class="btn btn-default" ng-click="cancel()" translate="common.no"></button>
        <button class="btn btn-success" data-loading-text="{{ 'common.loading' | translate }}"
                ng-click="onSetSelection($event, 'RetBySpecia', selected.item.servReq_Id, selected.input)"
                translate="common.yes"></button>
    </div>
</script>